package com.my.study;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;

public class MapTest {

    public static void main(String[] args) {


        List<Long> a = Arrays.asList(123L, 1234L);
        List<Long> b = Arrays.asList(1234L, 123L, 1234567889L);

        Collections.sort(a);
        Collections.sort(b);
        System.out.println(a.containsAll(b));
        System.out.println(a.equals(b));



    }


    public int judgeSkuIsMatch(Map<Integer, List<Long>> orderRequireSkuMap, Map<Integer, List<Long>> docSkuIdMap){


        int matchCount = 0;
        for(Map.Entry<Integer, List<Long>> entry : orderRequireSkuMap.entrySet()){
            if(docSkuIdMap.containsKey(entry.getKey())){

                List<Long> requiredSkuList = entry.getValue();
                List<Long> docSkuList = docSkuIdMap.get(entry.getKey());
                for(Long docSku : docSkuList){
                    if(requiredSkuList.contains(docSku)){

                    }else{

                    }
                }

            }
        }
        //匹配行数=待匹配数量
        if(matchCount == orderRequireSkuMap.size()){
            //LOGGER.error("orderId: " + order.getOrderId() + ", sku完全匹配-==========");
            // 完全匹配
           // return ResultUtil.buildSuccessResult(result, 0);
            return 0;
        }
        // 完全不匹配
        //LOGGER.error("orderId: " + order.getOrderId() + ", sku完全不匹配-==========");
        //return ResultUtil.buildSuccessResult(result, 2);
        return 2;

    }
}
